﻿using PetkaWebDav.Server.Framework.BaseClasses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace CloudStorageLight.Core.WebDav.Handlers
{
    public static class DavMethodBaseExtension
    {
        public static string GetRelativeRequestPath(this DavMethodBase @this)
        {
            var httpApplication = @this.HttpApplication;
            if (httpApplication == null)
            {
                throw new ArgumentNullException("HttpApplication");
            }
            var path = string.Concat(httpApplication.Request.Url.Segments);
            return AzureUtil.GetRelativeRequestPath(path);

        }


    }
}
